import { User } from '@libs/db/models/user.model';
import { Controller } from '@nestjs/common';
import { InjectModel } from 'nestjs-typegoose';
import { Crud } from 'nestjs-mongoose-crud'
import { ApiTags } from '@nestjs/swagger';

@Crud({
  //传递模型
  model:User
})

@Controller('users')
//接口文档 注释
@ApiTags('用户接口')
export class UsersController {
  //依赖注入数据库模型 属性注入
  constructor(@InjectModel(User) private readonly model){}
}
